package com.hl.service;

import com.hl.mapper.CourseReviewMapper;
import com.hl.pojo.CourseReview;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CourseReviewServiceImpl implements CourseReviewService {
    @Autowired
    private CourseReviewMapper courseReviewMapper;

    @Override
    public Integer addCourseReview(CourseReview courseReview) {
        return courseReviewMapper.addCourseReview(courseReview);
    }

    @Override
    public Integer deleteCourseReviewById(Integer id) {
        return courseReviewMapper.deleteCourseReviewById(id);
    }

    @Override
    public CourseReview findCourseReviewById(Integer id) {
        return courseReviewMapper.findCourseReviewById(id);
    }

    @Override
    public List<CourseReview> findAllCourseReview() {
        return courseReviewMapper.findAllCourseReview();
    }

    @Override
    public List<CourseReview> findCourseReviewByCourseId(Integer courseId) {
        return courseReviewMapper.findCourseReviewByCourseId(courseId);
    }

    @Override
    public Integer updateCourseReview(CourseReview courseReview) {
        return courseReviewMapper.updateCourseReview(courseReview);
    }
}
